#include <iostream>
#include "IAudioIn.h"
#include "IAudioOut.h"

int main(int ac, char **av)
{
	Buffer2 *buf = new Buffer2(500000);
	IAudioIn *manager = new IAudioIn(buf);
	IAudioOut *out = new IAudioOut(buf);

	char **arr = manager->detectDevice();
	for (int i = 0; arr && arr[i] != NULL; i++)
	{
		 std::cout << arr[i] << std::endl;
	}
	std::cout << "AL_INVALID_NAME -> " << AL_INVALID_NAME << std::endl;
	std::cout << "AL_INVALID_ENUM -> " << AL_INVALID_ENUM << std::endl;
	std::cout << "AL_INVALID_VALUE -> " << AL_INVALID_VALUE << std::endl;
	std::cout << "AL_INVALID_OPERATION -> " << AL_INVALID_OPERATION << std::endl;
	std::cout << "AL_OUT_OF_MEMORY -> " << AL_OUT_OF_MEMORY << std::endl;
	manager->start();
	out->start();
	while(42)
	{
		Sleep(400);
	}
	system("pause");
}